/**
  ******************************************************************************
  * File Name          : ctrl_xc.c
  * Description        : Code for data process applications
  ******************************************************************************
  * @attention
  *
  ******************************************************************************
  */

/* Includes ------------------------------------------------------------------*/
#include "tskcfg.h"
#include "bsp.h"
#include "spiflash.h"
#include "collector.h"
#include "ctrl_common.h"


void Ctrl_xc(int16_t temper)
{
  uint8_t fnnum;
  uint16_t act;
  
  fnnum = 0;
  
  if((Ctrl_ParaMD.mode == CTRL_MODE_JT) || (Ctrl_ParaMD.mode == CTRL_MODE_ZN))
  {
		if(temper >= Ctrl_ParaJT.fnhitp)
		{
			fnnum = CtrFan_GetActNum();
			
			/* 此处是开度 */
			act = Ctrl_ParaJT.xcfnins * fnnum;
			if(act > 100)
			{
				xc_act = 100;
			}
			else
			{
				xc_act = act;
			}
		}
		else
		{
			xc_act = 0;
		}
  }
  else
  {
    xc_act = 200;
  }
}
